/**
 * Copyright (c) 2012, SHX Studio.
 * All rights reserved.
 * rosary226@gmail.com
 * 
 * @author shenqianfeng
 * @date 2012-9-10 下午02:50:52   
 * @version 1.0   
 */
package com.xxx.sqfengine.texture;

import java.nio.FloatBuffer;

import com.xxx.sqfengine.util.SQFGLBufferUtil;


/**
 *   (0,0)         (1,1)
 *      ------------
 *      |          |
 *      |          |
 *      |          |
 *      |          |
 *      ------------
 *   (0,1)         (1,0)   
 *   
 *   
 *   
 *   (2)         (3)
 *      ------------
 *      |          |
 *      |          |
 *      |          |
 *      |          |
 *      ------------
 *   (0)         (1)   
 */


/**
 * @author shenqianfeng
 */
public class SQFGLUv {
	
	private float mU;
	private float mV;
	
	public SQFGLUv() {
		mU = 1.0f;
		mV = 1.0f;
	}
	
	public SQFGLUv(float u, float v) {
		mU = u;
		mV = v;
	}
	
	public FloatBuffer toUvFloatBuffer() {
		float [] uvs = {0.0f, mV, 
						mU, mV,
						0.0f, 0.0f,
						mU, 0.0f};
		return SQFGLBufferUtil.toFloatBuf(uvs);
	}
}
